/*
 * @Author       : Joel
 * @Date         : 2025-04-01 08:49:08
 * @LastEditors  : Joel
 * @LastEditTime : 2025-04-01 09:47:10
 * @FilePath     : /usr/board_driver/battery_detect.h
 * @Description  : 
 * Copyright(C)2025 YiJiaLink, All Rights Reserved. 
 * 2025-04-01 08:49:08
 */
#ifndef __BATTERY_DETECT_H
#define __BATTERY_DETECT_H

#include "py32f0xx_ll_bus.h"
#include "py32f0xx_ll_cortex.h"
#include "py32f0xx_ll_adc.h"
#include "py32f0xx_ll_gpio.h"
#include "py32f0xx_ll_rcc.h"
#include "py32f0xx_ll_system.h"
#include "py32f0xx_ll_utils.h"

#ifdef __cplusplus
extern "C"
{
#endif
/* PB0 */
#define BAT_VOLTAGE_CHANNEL LL_ADC_CHANNEL_8

    int battery_detect_init(void);
    uint32_t get_battery_voltage(void);

#ifdef __cplusplus
}
#endif

#endif /* __BATTERY_DETECT_H */